Spot by NetApp API (1.0)

Download OpenAPI specification:Download

Welcome to the Spot by NetApp OpenAPI Specification. Here you will find REST definitions for all Spot products and platform administration tasks.

The API is hosted at https://api.spotinst.io and requires Bearer Token Authentication.

For more information on how to use the Spot platform, including user guides, developer guides, concepts and tutorials see the external Spot Documentation.

Authentication

auth

To generate bearer tokens and understand more about Spot by NetApp authentication see the howto for token creation on the Spot Help site.

Organizations and Accounts

Each Spot account is assigned to an organization and a set of environment Accounts. An account is then linked to a specific cloud provider account.

Spot accounts are given an ID in the format act-123abcd that is sent as a query parameter while performing API calls.

To locate the account ID navigate to Settings -> Account in the Spot console.

Organizations with a Single Account

Each API call you make can be used with or without the account ID.

Organizations with Multiple Accounts

Each API call you make should be appended to the account ID. For example:

GET https://api.spotinst.io/aws/ec2/group?accountId=act-123de678 This call will return the list of Elastigroups for the specific Account used.

NOTE: If no accountId is provided, the default (dldest) account for the Organization will be used.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Organizations

Get Users

Get all users in the organization, their details, and mapped accounts. Providing the optional account ID parameter will filter out all users not mapped to that account.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account you would like to get retrieve users from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create User

Create a new user and link it to the creator's organization (the organization ID from the personal token attached to the API call). If the role is a viewer, the user is also linked to the default account for the organization.

Authorizations:
query Parameters
generateToken
any
Example: generateToken=true

If true, then the response will include personalAccessToken string

Request Body schema: application/json
email
string

Email

firstName
string

The first name of the user

lastName
string

The last name of the user

password
string

Password

role
string

User's role

Responses

Request samples

Content type
application/json
{
  • "firstName": "Test",
  • "lastName": "Test",
  • "email": "test@spot.io",
  • "password": "password1234",
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get User

Get user's account mapping

Authorizations:
query Parameters
userEmail
required
any
Example: userEmail=test@spot.io

Target user email address

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Organization

Delete a Spot Organization. ID of the organization can be obtained from your Spot console via the following link: https://console.spotinst.com/#/settings/organization/general > Note: This cannot be undone. Take caution.

Authorizations:
path Parameters
organizationId
required
any
Example: 606079812345

ID of the organization you would like to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Programmatic User

This API creates a new programmatic user (not a human user). Use this API to provide privileges to an application that needs to interface with Spot. Spot returns a token that the programmatic user can use to perform actions with.

Authorizations:
Request Body schema: application/json
required
Array of objects

All the accounts the programmatic user will have access to. Cannot be empty.

description
string

Brief description of the user.

name
required
string

Name of the programmatic user.

Responses

Request samples

Content type
application/json
{
  • "description": "test programmatic",
  • "name": "testProgrammaticApi",
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get All Programmatic Users

Get all the Programmatic Users in the organization.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Update Programmatic User

Updates the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Request Body schema: application/json
Array of objects

All the accounts the programmatic user will have access to. Cannot be empty.

description
string

Brief description of the user.

Responses

Request samples

Content type
application/json
{
  • "description": "test programmatic",
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get Programmatic User

Gets the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Delete Programmatic User

Deletes the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Create Organization

Create a Spot Organization.

Authorizations:
Request Body schema: application/json
object

Organization

Responses

Request samples

Content type
application/json
{
  • "organization": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Accounts

Update Account

Update information in an account such as the account name and slack channel. To use this command, permissions for organization admin are required. Granular permissions will require access policies with the following actions: setup:updateAccount

Authorizations:
path Parameters
accountId
required
string
Example: act-123abc

ID of the account you would like to update

Request Body schema: application/json
required
object

Used for updating items in an account.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Account

Delete a Spot Account. The Spot Account ID can be obtained from your Spot console via the following link: https://console.spotinst.com/#/settings/account/general . Note This cannot be undone – take caution. Only Organization Admins can perform this action. In case you want to delete your default Spot account which is the account visible when you first log in please contact Support.

Authorizations:
path Parameters
accountId
required
any
Example: act-123456

ID of the account you would like to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Users

Get all users in the organization, their details, and mapped accounts. Providing the optional account ID parameter will filter out all users not mapped to that account.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account you would like to get retrieve users from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Assign Users to Accounts

Assign users to accounts in bulk. Only accounts under the creator's own organization are allowed. Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
One of
mappings
Array of any

Mappings objects include user, accountID and role.

Responses

Request samples

Content type
application/json
Example
{
  • "mappings": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update User Permissions

Change the users' permissions for an account (only accounts under the creator's own organization are allowed). Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
string
Example: act-123abc

ID of the account associated with your token

Request Body schema: application/json
One of
permissionStrategy
string
Default: "ROLE_BASED"

Set the user permissions type, by role or by access policy. Valid values "ROLE_BASED", "POLICY_BASED"

role
string

Valid values "viewer", "editor". Required on permissionStrategy = ROLE_BASED

userId
string

One of userEmail / userId is required. identify user by its user ID

Responses

Request samples

Content type
application/json
Example
{
  • "userId": "u-1234",
  • "permissionStrategy": "POLICY_BASED",
  • "role": "editor"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach User

Detach a user from an account (only accounts under the creator's own organization are allowed). Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
required
any
Example: act-123abc

Account ID

Request Body schema: application/json
userEmail
required
string

Email of the user that is going to be deleted

Responses

Request samples

Content type
application/json
{
  • "userEmail": "test@gmail.com"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Existing User Permissions

Add a user to the account and set its permissions on the account. Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
required
any
Example: act-123abc

Account ID

Request Body schema: application/json
One of
role
string

Valid values - "viewer", "editor". Required on permissionStrategy = ROLE_BASED

userEmail
string

One of userEmail / userId is required. identify user by its user ID

Responses

Request samples

Content type
application/json
Example
{
  • "userEmail": "test@spot.io",
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Account

Create a Spot account.

Authorizations:
Request Body schema: application/json
object

Account

Responses

Request samples

Content type
application/json
{
  • "account": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Accounts

Get a list of Spot accounts in your organization. When used without any parameters, the provided token must have Organization Admin permissions and the output will contain all the Organization's accounts. Note In case you want to list all the accounts associated with Organization you can use the below request URL without the cloudAccountId parameter, https://api.spotinst.io/setup/account

Authorizations:
query Parameters
cloudAccountId
string
Example: cloudAccountId=634245686616

Will list only the Spot accounts connected to the specified account ID.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Access Policy

Create an access policy. access policy enables you to define the user's permissions on a granular level than the role-based permissions.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Set access policy settings. Example - Acme, Inc.

Responses

Request samples

Content type
application/json
{
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Access Policies

Get access policy settings.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Users Permissions

Get the permissions for all the users in the account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Access Policy

Updates an access policy settings.

Authorizations:
path Parameters
policyId
required
any
Example: pol-2344nn

The access policy ID to delete

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Set access policy settings

Responses

Request samples

Content type
application/json
{
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Access Policy

Deletes an access policy settings.

Authorizations:
path Parameters
policyId
required
any
Example: pol-2344nn

The access policy ID to delete

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for AWS

Link a Spot account to an AWS Cloud account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Credentials details

Responses

Request samples

Content type
application/json
{
  • "credentials": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for GCP

Link a Spot account to a GCP Cloud account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Set service account for credentials

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Validate Credentials for GCP

Validate the credentials for connecting a Spot account to an GCP Cloud account. The validation will test the credentials without actually set it. Please notice to run the set credentials request to perform the set account credentials.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Set service account for credentials

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for Azure

Link a Spot account to an Azure Cloud account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
clientId
string

Set the application ID

clientSecret
string

Set the key secret

subscriptionId
string

Set the subscription ID

tenantId
string

Set the directory ID

Responses

Request samples

Content type
application/json
{
  • "clientId": 111111111,
  • "clientSecret": "32431r2431434132",
  • "tenantId": "1321e1e3123er23",
  • "subscriptionId": "234r3141131"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Validate Credentials for Azure

Validate the credentials for connecting a Spot account to an Azure Cloud account. The validation will test the credentials without actually set it. Please notice to run the set credentials request to perform the set Azure account credentials (https://docs.spot.io/connect-your-cloud-provider/azure-account) .

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
clientId
string

Set the application ID

clientSecret
string

Set the key secret

subscriptionId
string

Set the subscription ID

tenantId
string

Set the directory ID

Responses

Request samples

Content type
application/json
{
  • "clientId": "111111111",
  • "clientSecret": "32431r2431434132",
  • "tenantId": "1321e1e3123er23",
  • "subscriptionId": "234r3141131"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean AWS

Ocean - Serverless containers for Amazon Web Services (AWS)

Create Cluster

Prerequisites

The Spot Controller is used to monitor the cluster resources and report back to Ocean and is required for Ocean On-Prem.

To install the Spot Controller, complete and run the following script on a machine with kubectl command line tool installed and configured:

#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
bash
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Clusters

List the configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete an existing Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configuration of an existing Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, except for region and ID. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

autoApplyTags
string
Example: autoApplyTags=true

Optionally update instance tags on the fly without rolling the cluster.

Request Body schema: application/json
required
object (AWS Cluster)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Heartbeat Status

Get Ocean cluster's controller heartbeat status.
The response would return the heartbeat status and last heartbeat timestamp."

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
Authorization
string
content-Type
string

Responses

Request samples

Content type
application/json
{
  • "content-Type": "application/json",
  • "Authorization": "Bearer ${token}"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Elastilog

Fetch an Ocean Cluster's log

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

LIMIT
integer
Example: LIMIT=200

Maximum number of lines to extract in a response. Default: 500

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource id. Default: Null

SEVERITY
string
Example: SEVERITY=INFO

Severity of log entries to extract. Valid Values: ALL, INFO, DEBUG, WARN. Default: ALL

toDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG To Ocean Cluster

Create an Ocean configuration according to an AWS autoscaling group (ASG) configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

autoScalingGroupName
required
string

The autoscaling group name.

region
required
string
Example: region=us-east-1

Region name of the ASG.

Responses

Response samples

Content type
application/json
{
  • "name": "TestASG1",
  • "controllerClusterId": "ocean-ed609402-8557-4d18-818a-e549333cc11e",
  • "region": "us-west-2",
  • "capacity": {
    },
  • "compute": {
    }
}

Fetch Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

namespace
string

For K8S, namespace is an optional query param which filters the retrieved resources

Request Body schema: application/json
object

Optional - may be null.

Responses

Request samples

Content type
application/json
{
  • "filter": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster Costs

Describes Kubernetes cluster costs in a time range based on resource allocation.
The response will provide the distribution of the costs per cluster, namespace, and deployment.
For each entity, the response will contain breakdown to compute and EBS costs as well.
In addition, response will show labels/annotations for each namespace or deployment so you can filter costs by labels or annotations.

Authorizations:
path Parameters
clusterIdentifier
required
string
Example: ocean.k8s

The Ocean cluster's identifier as set in the Ocean cluster's configuration under the "controllerClusterId" field.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

aggregationPeriod
string

Possible values: "daily", null. For daily value response contains aggregated data by day.
If null - response returns sum of costs per period

fromDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

toDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Upgrade Elastigroup To Ocean

Upgrade an Elastigroup with K8s integration into Ocean for K8s cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

groupId
required
string

Elastigroup ID

Responses

Response samples

Content type
application/json
{
  • "kind": "spotinst:ocean:aws:k8s",
  • "items": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceIds. Performing this request will start the roll immediately, by defined batches. Note that the first response for a successful request will notify for starting a roll. In order to check the status of a roll, you can use the GET Roll API.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Settings for roll operation

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "STARTING",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "instanceIds": [
    ],
  • "launchSpecIds": [
    ],
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

List Rolls

Get status for all rolls of an Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "status": {
    },
  • "kind": "spotinst:ocean:aws:k8s:cluster:roll",
  • "items": [
    ]
}

Update Roll

Update a roll of an Ocean cluster.

Performing the request will stop the next batch in a roll

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Settings for roll operation

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "STARTING",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Roll

Get status for roll of an Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-1abcd124

The ID of the Ocean

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "STARTING",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "instanceIds": [
    ],
  • "launchSpecIds": [
    ],
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Create Virtual Node Group

Create a Virtual Node Group.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

initialNodes
integer
Example: initialNodes=1

When set to an integer greater than 0, a corresponding amount of nodes will be launched from the created virtual node group.

Request Body schema: application/json
object (AWS Cluster)

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Virtual Node Groups

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

OCEAN_ID
required
string
Example: OCEAN_ID=o-abcd1234

The ID of the Ocean cluster.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Launch Spec

Delete a specified launch specification in an Ocean cluster.

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

deleteNodes
boolean
Example: deleteNodes=true

When set to "true", all instances belonging to the deleted launch specification will be drained, detached, and terminated.

forceDelete
boolean
Example: forceDelete=true

When set to "true", delete even if it is the only custom launch spec remaining, and default launch spec has useAsTemlateOnly = true.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Launch Spec

Update launch specification.

Authorizations:
path Parameters
autoApplyTags
boolean
Example: true

Ocean cluster launchSpec ID. Can get launchSpec ID with get call.

OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object (AWS Cluster)

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Launch Spec

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG To Ocean Cluster Launch Specification

This API creates an Ocean cluster launch specification configuration according to an AWS autoscaling group (ASG) configuration. By using the API, Create Launch Specification, you can then use the returned launch specification to create an actual Ocean launch specification. This API fetches an AWS ASG and converts it to a launch specification template. The response returned is an imported launch specification from the ASG in the required JSON format which you can then use in the Create Launch Specification API.

Authorizations:
path Parameters
autoScalingGroupName
required
string

The ASG name.

OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "oceanId": "o-500a5d5a",
  • "name": "TestTeam1",
  • "imageId": "ami-0ce21b51cb55a48b8",
  • "securityGroupIds": [
    ],
  • "tags": {
    }
}

Ocean ECS

Ocean - Serverless containers for Amazon Elastic Container Service (ECS)

List Clusters

Get the configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Cluster

Create a new Ocean ECS cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object (ECS Ocean)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, excluding the Region and ID. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object (ECS Ocean)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Elastilog

Fetch an Ocean Cluster's log

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

LIMIT
integer
Example: LIMIT=200

Maximum number of lines to extract in a response. Default: 500

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource id. Default: Null

SEVERITY
string
Example: SEVERITY=INFO

Severity of log entries to extract. Valid Values: ALL, INFO, DEBUG, WARN. Default: ALL

toDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Upgrade Elastigroup to Ocean

Upgrade an Elastigroup with ECS integration into Ocean for ECS cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

groupId
required
string
Example: groupId=sig-1234abcd

The Elastigroup ID to upgrade.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceIds. Performing this request will start the roll immediately, by defined batches. Note that the first response for a successful request will notify for starting a roll. In order to check the status of a roll, you can use the GET Roll API using the roll ID.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
One of
batchSizePercentage
integer

Value in % to set size of batch in roll. Valid values are 0-100

comment
string

Add a comment description for the roll. comment should be limit to 256 chars.

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "comment": "This is why I deployed my cluster.",
  • "launchSpecIds": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Rolls

List rolls of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Roll

Update a roll of an Ocean cluster. Performing the request will stop the next batch in a roll.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
comment
string

Add a comment description for the roll. comment should be limit to 256 chars.

status
string

Set status to roll.

Responses

Request samples

Content type
application/json
{
  • "status": "STOPPED",
  • "comment": "This is why I deployed my cluster."
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Roll

Get status for roll of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Launch Spec

Create a new Ocean ECS LaunchSpecification in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Launch Specs

Get all the custom launch configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Launch Spec

Get a specific custom launch configuration for an Ocean cluster in the specified account.

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Launch Spec

Delete a specified launch specification in an Ocean cluster.

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

deleteContainerInstances
any
Example: deleteContainerInstances=true

When set to "true", all instances belonging to the deleted launch specification will be drained, detached, and terminated.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Launch Spec

Get a specific custom launch configuration for an Ocean cluster in the specified account.

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Fargate To Existing Ocean Cluster

Import a Fargate service into an existing Ocean ECS cluster. Upon Fargate service import, Spot clones the selected Fargate services and runs them with the same VPC & Subnet settings on EC2 Spot Instances. Ocean will automatically and seamlessly predict and replaces Spot Instances before they are interrupted, ensuring the uptime of the cluster and providing cost-savings of up to 90% over Fargate-enabled ECS clusters.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
services
Array of strings

List of Fargate services by their names. Must contain at least one service

simpleNewServiceNames
boolean
Default: false

Flag to align imported services names in the following format: sfm_

Responses

Request samples

Content type
application/json
{
  • "services": [
    ],
  • "simpleNewServiceNames": false
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Fargate Services Discovery

Get existing Fargate services in the ECS cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Fargate Migration Status

Get the status of a Fargate service import.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Ocean Cluster ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Fargate To New Ocean Cluster

This API copies the configuration from a Fargate service into the corresponding fields of an Ocean object. (This process is commonly referred to as importing.) The API returns an Ocean object that is suitable for use in the Create API to create a new Ocean cluster based on your Fargate configuration. If you are migrating a Fargate service that has tags, you must run the Opt In procedure on your Amazon account or IAM role. This is required in order to obtain the necessary Amazon Resource Name (ARN) and resource ID format for your ECS tasks, container instances, and services. For more information about the required ARN and the Opt In procedure, see the following pages -

The API requires one of the following permissions to be defined in Spot -

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
ecsClusterName
string

Name of the cluster in ECS.

keyPair
string

Specify a Key Pair to attach to the services.

oceanClusterName
string

Name of the cluster in new Ocean object.

region
string

Name of the AWS region the ECS cluster is in.

services
Array of any

Name of the ECS Fargate service to be imported.

Array of objects

Set tags for the service. Items should be unique.

Responses

Request samples

Content type
application/json
{
  • "oceanClusterName": "fargate-import-ocean",
  • "ecsClusterName": "fargateTestCluster",
  • "region": "us-west-1",
  • "services": [
    ],
  • "keyPair": "spot-prod",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean GKE

Ocean - Serverless containers for for Google Kubernetes Engine

Get Cluster Costs

Describes Kubernetes cluster costs in a time range based on resource allocation.
The response will provide the distribution of the costs per cluster, namespace, and deployment.
For each entity, the response will contain breakdown to compute and EBS costs as well.
In addition, response will show labels/annotations for each namespace or deployment so you can filter costs by labels or annotations.

Authorizations:
path Parameters
clusterIdentifier
required
string
Example: ocean.k8s

The Ocean cluster's identifier as set in the Ocean cluster's configuration under the "controllerClusterId" field.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

aggregationPeriod
string

Possible values: "daily", null. For daily value response contains aggregated data by day.
If null - response returns sum of costs per period

fromDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

toDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Cluster

Prerequisites:

The Spot Controller is used to monitor the cluster resources and report back to Ocean.| To install the Spot Controller, complete and run the following script on a machine with kubectl command line tool installed and configured:

  #!/usr/bin/env bash
  curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
  SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
  SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
  SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
  bash

You may need Kubernetes admin privileges for this script to work. To assign yourself with admin privileges, run the following command:

  kubectl create clusterrolebinding <clusterName> --clusterrole=cluster-admin --user=<userEmail>

For detailed guide please refer to our controller installation guides. Install can be made by kubectl or Helm. For more on the Spot controller and Ocean's anatomy see the documentation here.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

The Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "autoScaler": {
    },
  • "capacity": {
    },
  • "strategy": {
    },
  • "scheduling": {
    },
  • "security": {
    }
}

List Clusters

List the configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for a specified Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, excluding the Name and controllerClusterId.
This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

The Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "autoScaler": {
    },
  • "capacity": {
    },
  • "strategy": {
    },
  • "scheduling": {
    },
  • "security": {
    },
  • "compute": {
    }
}

Fetch Elastilog

Fetch group’s Elastilog by

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

LIMIT
integer
Example: LIMIT=200

Maximum number of lines to extract in a response. Default: 500

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource id. Default: Null

SEVERITY
string
Example: SEVERITY=INFO

Severity of log entries to extract. Valid Values: ALL, INFO, DEBUG, WARN. Default: ALL

toDate
required
string

data values following either a date format (yyyy-mm-dd ; 2016-11-20) or ms (1494751821472)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

namespace
string

For K8S, namespace is an optional query param which filters the retrieved resources

Request Body schema: application/json
object

Optional - may be null.

Responses

Request samples

Content type
application/json
{
  • "filter": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Create Launch Spec

Create a Launch Spec.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object (GKE Cluster)

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Launch Specs

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Launch Spec

Delete a specified launch specification in an Ocean cluster.

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

deleteNodes
boolean
Example: deleteNodes=true

When set to "true", all instances belonging to the deleted launch specification will be drained, detached, and terminated.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Launch Spec

All Ocean parameters are updatable

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object (GKE Cluster)

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Launch Spec

Authorizations:
path Parameters
OCEAN_LAUNCH_SPEC_ID
required
string

Ocean cluster launchSpec ID.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceNames. Performing this request will start the roll immediately, by defined batches.

Note that the first response for a successful request will notify for starting a roll. In order to check the status of a roll, you can use the GET Cluster Roll API using the roll ID.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Settings for roll operation

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "oceanId": "o-12e31234",
  • "status": "STARTING",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "instanceNames": [
    ],
  • "launchSpecIds": [
    ],
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

List Rolls

Get status for all rolls of an Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "status": {
    },
  • "kind": "spotinst:ocean:aws:k8s:cluster:roll",
  • "items": [
    ]
}

Update Roll

Update a roll of an Ocean cluster.

Performing the request will stop the next batch in a roll

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
status
string

Set status to roll. Valid values: "STOPPED"

Responses

Request samples

Content type
application/json
{
  • "status": "STOPPED"
}

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "status": "STOPPED",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Roll

Get status for roll of an Ocean cluster.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "oceanId": "o-12e31234",
  • "status": "STARTING",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "instanceNames": [
    ],
  • "launchSpecIds": [
    ],
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Upgrade Elastigroup To Ocean

Prerequisites | Perform following validations prior to upgrade executions: | * Group ID cannot be null * Group ID exists in Elastigroup * Group should be a GKE Elastigroup with defined scaling policy * Group ID is already managed by Ocean

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

groupId
required
string

Elastigroup ID

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean On-Premise

Ocean On-Premise API - Understand cost drivers within you on-premise clusters and compare the costs to the Ocean Cloud.

Ocean On-Premise - Create

Create a new Ocean On-Prem entity.

Prerequisites

The Spot Controller is used to monitor the cluster resources and report back to Ocean and is required for Ocean On-Prem. To install the Spot Controller, complete and run the following script on a machine with kubectl command line tool installed and configured:

  #!/usr/bin/env bash
  curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
  SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
  SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
  SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
  bash


For more on the Spot controller and Ocean's anatomy see the documentation here.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Ocean On-Premise - List

List the configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Delete Cluster

Delete an Ocean On-Prem cluster entity in Spot Ocean. This DOES NOT affect your on-prem cluster.

Authorizations:
path Parameters
CLUSTER_ID
required
string
Example: o-1abcd124

The ID of the Ocean cluster to delete.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for the specified Ocean On-Prem cluster entity.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Update Cluster

All Ocean on-prem parameters are updatable. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
OCEAN_ID
required
string
Example: o-abcd1234

The ID of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object (AWS Cluster)
group
object

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    },
  • "group": { }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Elastigroup AWS

Elastigroup for Amazon Web Services (AWS)

Create Elastigroup

Create a new AWS Elastigroup.

There are several third Party Integrations available, which can be activated based on your configuration, such as:

You can create a beanstalk elastigroup with the following steps:

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List All Elastigroups

List all AWS Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Describe a specific Elastigroup JSON

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup AWS

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (AMI Dellocation Options)
object (Beanstalk Dellocation Options)
object (Stateful deallocation options)

Responses

Request samples

Content type
application/json
{
  • "statefulDeallocation": {
    },
  • "beanstalk": {
    },
  • "amiBackup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Elastigroup

Describe a specific Elastigroup JSON

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Stateful Instances

List all stateful instances associated with the Elastigroup

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Pause Stateful Instance

Pause a stateful instance

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Stateful Instance

Pause a stateful instance

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Recycle Stateful Instance

Recycle a stateful instance AWS

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

De-allocate Stateful Instance

De-allocate a stateful instance – delete all the resources associated with the instance (network interface, snapshots, volumes)

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Stateful Instance

Create a new Stateful Elastigroup – this Elastigroup will have the same configuration and state of the imported instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "statefulMigrationGroup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Stateful Import Status

Get the current status of the import process. Possible values are:

  • MIGRATE_PREPARE_AWS_INSTANCE
  • MIGRATE_CREATE_IMAGE
  • MIGRATE_AWAIT_FOR_IMAGE
  • MIGRATE_AWAIT_USER_ACTION
  • MIGRATE_TERMINATE_INSTANCE
  • MIGRATE_AWAIT_INSTANCE_TERMINATION
  • MIGRATE_UPDATE_GROUP
  • MIGRATE_LAUNCH_INSTANCE
  • MIGRATE_AWAIT_INSTANCE_RUNNING
  • MIGRATE_RESUME_STATEFUL_INSTANCE
  • MIGRATE_AWAIT_STATEFUL_INSTANCE_RUNNING
  • MIGRATE_CANCEL
  • MIGRATE_FINISH
  • MIGRATE_ERROR
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

statefulMigrationGroupID
required
string
Example: statefulMigrationGroupID=smg-7f041234

The Process ID you want to query

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Stateful Import Status

Cancel the ongoing stateful import

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

statefulMigrationGroupID
required
string
Example: statefulMigrationGroupID=smg-7f041234

The Process ID you want to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Terminate Stateful Instance During Import Process

Manually terminate the source stateful instance during an stateful instance import.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

statefulMigrationGroupID
required
string

The Process ID you want to terminate

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "userAction": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Lock

Set termination protection for specific instance

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

AWS Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

ttlInMinutes
integer
Example: ttlInMinutes=23

Specify a TTL (in minutes) for this lock, meaning, for how long the protection will be valid for.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Unlock

Remove the termination protection from specific instance

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

AWS Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Describes the current status of a specific Elastigroup – entailing information regarding running instance and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Activity Events

Get historical data on events that happened in a specific Elastigroup like update, scaling activities, creation of new instances, etc.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string
Example: fromDate=2016-10-01

Starting date to fetch the events from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastilog

You can fetch a group's (Elastigroup/Ocean/Managed Instance) elastilog via the Spot API, in order to be able to consume elastilog from various tools used for log storing and analyzing. Logs have retention of 3 months back, so minimal fromDate should be up to 3 months back at runtime.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string
Example: fromDate=1540036800000

Epoch number that represents the date from which to collect the log (millisecond format)

limit
string
Example: limit=i-12345678

Maximum number of lines to extract in a response. Max value allowed - 1000. Default: 500

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource id. Default: Null

severity
string
Example: severity=ALL

Severity of log entries to extract. Valid Values: ALL, INFO,DEBUG,WARN. Default: ALL

toDate
required
string
Example: toDate=1542715200000

Epoch number that represents the date until which log is collected (millisecond format)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Capacity

Update the capacity of an Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object (Capacity)

Responses

Request samples

Content type
application/json
{
  • "capacity": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Add instances to your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
integer
Example: adjustment=1

The number of instances to add to the Elastigroup

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Remove instances from your Elastigroup. Note - Scale Advanced expression Remove instances from your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
integer
Example: adjustment=1

The number of instances to add to the Elastigroup

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Scaling Policies

Suspend processes inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

policyName
required
string
Example: policyName=Example Policy Name

Policy Name of scaling policy to suspend

Request Body schema: application/json
object (Suspension)

Responses

Request samples

Content type
application/json
{
  • "suspension": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Processes

Suspend processes inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
groupId
Array of strings

groupId

suspensions
Array of objects

Suspensions

Responses

Request samples

Content type
application/json
{
  • "groupId": [
    ],
  • "suspensions": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Suspended Processes

List all active Suspended processes for specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Remove Suspended Processes

Remove active suspension from Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
processes
Array of strings (Processes)

The list of processes to remove from suspension. Valid values are: AUTO_SCALE, AUTO_HEALING, OUT_OF_STRATEGY, PREVENTIVE_REPLACEMENT, REVERT_PREFERRED, SCHEDULING

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Suspended Scaling Policies

Suspended scaling policies inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Remove Suspended Scaling Policies

Resume suspended scaling policies inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

policyName
string
Example: policyName=policy_1

Name of the suspended scaling policy to remove from suspension

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs per Elastigroup

Get financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

aggregationPeriod
string
Example: aggregationPeriod=daily

Optional. The time period over which data is aggregated. Can only be "daily". For example, the figures in each data set are per day

fromDate
required
string
Example: fromDate=2018-06-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

toDate
required
string
Example: toDate=2018-11-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detailed Cost

Get detailed financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

fromDate
required
string
Example: fromDate=2018-06-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

toDate
required
string
Example: toDate=2018-11-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Status

Get the current instance status Possible status values - Active and Terminating

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import EC2 Instance

Import an EC2 instance into a new Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

instanceId
required
string
Example: instanceId=i-008a13360040aa88e

Enter the AWS instance Id of the instance to import

region
required
string
Example: region=us-east-2

The AWS region to create the new Elastigroup in

Request Body schema: application/json
object (Group)

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

AMI Backup

Get status of a specific deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Healthiness

Get a list of instances with health status.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instance

Detach instances from your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
drainingTimeout
integer (Time)

Draining Timeout

instancesToDetach
object (Instances to be detached)

Instances to be detached

shouldDecrementTargetCapacity
boolean (Decrement target capacity criteria)

Should Decrement Target Capacity Criteria

shouldTerminateInstances
boolean (Termination criteria)

Should Terminate Instances Criteria

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldTerminateInstances": true,
  • "shouldDecrementTargetCapacity": false,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG

Create a new Elastigroup – this Elastigroup will have the same configuration of the imported Autoscaling group

Authorizations:
query Parameters
accountId
string
Example: accountId=act-12345

Your account ID in Spot

autoScalingGroupName
required
string
Example: autoScalingGroupName=MyASG

The ASG name

dryRun
string
Example: dryRun=act-12345

When dryRun is set to true, the API call will return the Elastigroup configuration without actually performing any action

region
required
string
Example: region=us-east-1

The AWS region for the ASG

Request Body schema: application/json
object (Group)

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Type By Region

Get the available spot instances types available in a specific region

Authorizations:
query Parameters
region
required
string
Example: region=us-east-2

The AWS region

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Simulate an Instance Interruption

The simulate instance interruption API is used for simulating a spot interruption in AWS, so that customers can verify specific applicative behaviors in case an interruption takes place. Once the interruption api is called, instances posted in the API body will be terminated in AWS, thus mocking a spot interruption.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
instancesToInterrupt
string

A list of group's instance ids to interrupt

Responses

Request samples

Content type
application/json
{
  • "instancesToInterrupt": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Instance Signal

The instance signal API is used for notifying Spot about the instance state, so Spot can act accordingly. Supported signals are - INSTANCE_READY – Whenever this signal is sent, Spot will register the instance to the ELB INSTANCE_READY_TO_SHUTDOWN – Whenever this signal is sent, Spot will terminate the instance after it was marked for termination. Important - You need to define the expected signals for your Elastigroup in the group configuration.

Authorizations:
path Parameters
insatnceId
required
string
Example: i-123456

The instance ID you want to query

signal
required
string
Example: INSTANCE_READY

The specific signal you want to trigger. Valid Values: INSTANCE_READY, INSTANCE_READY_TO_SHUTDOWN

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
instanceId
string

The instance ID the signal refers to.

signal
string

The specific signal you want to trigger. Valid Values - INSTANCE_READY, INSTANCE_READY_TO_SHUTDOWN

Responses

Request samples

Content type
application/json
{
  • "instanceId": "i-123456",
  • "signal": "INSTANCE_READY"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Standby

Instance Standby enables you to put an instance in Standby state , update or troubleshoot the instance, and then return the instance to service. Instances that are on standby are still part of the Elastigroup, but they don't get application traffic. Whenever instance is standby state - It will be de-registered from all the ELBs / ALBs in the Elastigroup It won't be affected from Scale down activities in the Elastigroup The instance health won't be checked, and it won't be replaced When the instance exits the Standby state - The instance will be register back to all the ELBs / ALBs that are defined in the Elastigroup It will be considered and affected from all the Elastigroup activities (helth checks, scaling, etc.)

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to put in standby state

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Exit Instance Standby

Exit standby by mode

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to put in standby state

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Group's Deployments Status

Get list of all the deployments of a specific Elastigroup and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

limit
integer
Example: limit=5

Limits results

sort
string
Example: sort=createdAt:ASC

Field to sort by the results Default: createdAt:DESC

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy your Elastigroup (triggers Blue/Green Deployment that replaces the existing instances in the Elastigroup)

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
batchSizePercentage
required
integer

Indicates (in percentage) the batch size of the deployment (meaning, how many instances to replace in each batch)

drainingTimeout
integer >= 0
Default: 120

Indicates (in seconds) the timeout to drain the instances. Override the group value.

gracePeriod
required
integer

Indicates (in seconds) the timeout to wait until instance become healthy based on the healthCheckType

healthCheckType
string
Enum: "ELB" "ECS_CLUSTER_INSTANCE" "TARGET_GROUP" "OPSWORKS" "NOMAD_NODE" "MULTAI_TARGET_SET" "HCS" "EC2" "NONE"

Define a health check type.
If no value is set the roll will use the group’s auto-healing health check.

object

The roll strategy

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300,
  • "healthCheckType": "EC2",
  • "drainingTimeout": 60,
  • "strategy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop an existing deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

rollId
required
string
Example: sbgd-9876

The deployment ID you want to stop

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (Role)

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Deployment Status

Get status of a specific deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

rollId
required
string
Example: sbgd-9876

The deployment ID you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Deployment Actions

Apply a Detach action to a deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

rollId
required
string
Example: rollId=sbgd-9876

The deployment ID to call the action on

Request Body schema: application/json
actionType
string (Type of action)

Sets the action that will take place, Accepted values are: DETACH_OLD, DETACH_NEW

drainingTimeout
integer (Draining timeout criteria)

Indicates (in seconds) the timeout to wait until instance are detached

shouldDecrementTargetCapacity
boolean (Should Decrement Target Capacity criteria)
Default: true
shouldHandleAllBatches
boolean (Should Hnadle All Batches Criteria)
Default: false

Indicator if the action should apply to all batches of the deployment or only the latest batch

Responses

Request samples

Content type
application/json
{
  • "actionType": "DETACH_NEW",
  • "shouldHandleAllBatches": true,
  • "drainingTimeout": 200,
  • "shouldDecrementTargetCapacity": true
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Initiate Cluster Roll

Initiate a cluster roll for an Elastigroup with ECS cluster

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Update Cluster Roll Status

Update a running ECS cluster roll status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Get All Cluster Rolls Per Elastigroup

Get status for every ECS cluster rolls in given Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Get Cluster Roll Status by Roll ID

Get status for specific ECS cluster rolls in given Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

ROLL_ID
required
string

The cluster roll ID you want to query

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Beanstalk Maintenance

Put your Beanstslk Elastigroup into maintenance mode, before you start updating the beanstalk configuration.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Finish Beanstalk Maintenance

Finish maintenance mode, and trigger a blue-green deployment.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Beanstalk Maintenance Status

Get the group maintenance status.

  • If the status is ACTIVE: putting the group in maintenance mode is allowed.
  • If the status is AWAIT_USER_UPDATE: the group is pending for manually finishing maintenance mode.
  • If the status is CANCELING_MAINTENANCE_MODE: the group is in the process of canceling maintenance mode.
Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Beanstalk Configuration

  • Get your Beanstalk environment configuration from AWS. This call is typically used as the initial step in importing your existing Beanstalk configuration to an Elastigroup.
  • Note: To optimize the availability of your Beanstalk workload on Elastigroup, instance types similar to those running in your existing configuration are automatically added to the response under instanceTypes. Should these instance types not meet your requirements you may remove them.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

environmentId
required
string
Example: environmentId=e-12345

The Beanstalk name

region
required
string
Example: region=us-east-1

The AWS region for the Beanstalk

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Beanstalk Reimport

Re-import the beanstalk configuration

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create CodeDeploy B/G Deployment

Trigger a Blue-Green deployment to your Elastigroup, this will initiate a deployment that will replace the existing instances(blue) with new ones(green).

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get CodeDeploy B/G Deployment

Get CodeDeploy Elastigroup deployment status for more information see: CodeDeploy B/G Deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup AWS EMR Scaler

List All Scalers

List all MR Scalers and their configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Scaler

Create a new EMR cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Scaler Operator

mrScaler – required will have the same configuration as in createMrScaler with one exception: we will only work with strategy of “new”, no “clone”/”warp” will be allowed.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "GuyEmrOperatorTest",
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Scaler

Get a description of a specific MR Scaler and its configuration.

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Scaler

Update an MR Scaler. Partial updating is supported.

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
One of
object

MR Scaler Object - Update Task Capacity

Responses

Request samples

Content type
application/json
{
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Scaler

Delete an MR Scaler

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Instances

Get a list of all instances and instances groups in the cluster

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Scale up MR Scaler instances

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=3

Number of instances to add to the MR Scaler

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Scale down MR Scaler instances

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=3

Number of instances to remove from the MR Scaler

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Scalers

Get MR Scaler cluster

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Scaler Costs

Get financial information on the MR Scaler, including running time, costs, and savings

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup GCP

Elastigroup for Google Cloud

List Elastigroups

List all GCP Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new GCP Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List all properties for single GCP Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup GCP

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Update an GCP Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import GKE Cluster

Import an existing GKE cluster to Elastigroup.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

clusterId
required
string
Example: clusterId=myGKECluster

The GKE Cluster identifier

clusterLocation
required
string
Example: clusterLocation=us-central1-a

The location of the cluster. Enter the desired zone for zonal GKE clusters or the region for regional GKE clusters.

nodePoolName
string
Example: nodePoolName=somePoolName

Set the node pool to import

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get the status for all instances that are memebers of the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Activity Events

Get all activity events for the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string <date-time>
Example: fromDate=2019-05-17

Get items on or after this date (ISO 8601)

toDate
required
string <date-time>
Example: toDate=2019-05-25

Get items on or before this date (ISO 8601)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastilog

Fetch a group's Elastilog

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

limit
integer <= 1000
Default: 500
Example: limit=200

Maximum number of items to return.

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Add instances to the Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=1

The number of instances to add to the group

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Remove instances from the Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=1

The number of instances to remove from the group

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Costs

Get financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Deployments

Get all of the deployments for a specific Elastigroup, and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
batchSizePercentage
required
integer

(in percentage) the batch size of the deployment, i.e.: how many instances to replace in each batch

gracePeriod
required
integer

(in seconds) the time until an instance becomes healthy in the load balancer

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy the Elastigroup: Triggers a Blue/Green deployment that replaces the existing instances in the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
batchSizePercentage
required
integer

(in percentage) the batch size of the deployment, i.e.: how many instances to replace in each batch

gracePeriod
required
integer

(in seconds) the time until an instance becomes healthy in the load balancer

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Get a specific deployment's status

Authorizations:
path Parameters
rollId
required
string

The deployment ID to query

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop an existing deployment

Authorizations:
path Parameters
rollId
required
string

The deployment ID to query

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instances

Detach instances from an Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
drainingTimeout
integer

(Applies only if shouldTerminateInstances is on) The draining timeout (in seconds) before terminating the instance. If no draining timeout is defined, the group's draining timeout applies.

instancesToDetach
array

The names of the instances to detach from the group.

shouldDecrementTargetCapacity
boolean

Indicates whether to decrement the capacity of the group, so no new instance will be launched instead of the detached one.

shouldTerminateInstances
boolean

Indicates whether to terminate the instances or not.

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldTerminateInstances": true,
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 0
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Instance Status

Get the current instance status. Possible status values: ACTIVE, TERMINATING

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Lock Instance

Set termination protection for a specific instance.

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

ttlInMinutes
required
string

Specify a TTL (in minutes) for this lock, i.e.: for how long the protection will be valid for.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Unlock Instance

Remove termination protection for a specific instance.

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup Azure Spot VMs

Elastigroup for Microsoft Azure

Update Elastigroup

Update an Azure Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-123123

Elastigroup's ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List an Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new Elastigroup cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object (Azure Elastigroup)

Azure Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Elastigroups

List Elastigroup clusters.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

NAME
string
Example: NAME=name

Filters to find the Elastigroup via a specific name.

REGION
string
Example: REGION=region

Filters to find all the groups in a specific region.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get status of Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Group

Suspends the Group.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
processes
Array of any

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Group

Resumes the Group.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
processes
Array of any

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach VMs

Scale down specific virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
drainingTimeout
string
Default: 300

The time in seconds to allow the virtual machine be be drained from incoming TCP connections and detached from MLB before terminating it.

shouldDecrementTargetCapacity
required
Boolean

Prevent Elastigroup from scaling back to target capacity when virtual machines are detached.

shouldTerminateVms
required
Boolean

Whether to terminate the VMs or not.

vmsToDetach
required
Array of strings

Array of virtual machine names to detach.

Responses

Request samples

Content type
application/json
{
  • "vmsToDetach": [
    ],
  • "shouldTerminateVms": true,
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Scale down virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=5

Number of VMs to scale down

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Scale up virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

adjustment
required
integer
Example: adjustment=5

Number of VMs to scale up

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy the Elastigroup. This triggers a Blue/Green deployment that replaces the existing VMs in the Elastigroup.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get All Deployments

Get a list of all the deployments of a specific Elastigroup and the status of each one.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

LIMIT
integer
Example: LIMIT=14

Limits the number of deployments returned. Default: 5

SORT
string
Example: SORT=createdAt:DESC

Field by which to sort the results. Default: createdAt:DESC

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Get the status of a specific deployment.

Authorizations:
path Parameters
DEPLOYMENT_ID
required
string
Example: sbgd-9876

The deployment ID you want to query.

groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment Status

Get the detailed status of a specific deployment. This includes status details per batch and other information.

Authorizations:
path Parameters
DEPLOYMENT_ID
required
string
Example: sbgd-9876

The deployment ID you want to query.

groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Group From Scale Set

Given a scale set, constructs a valid group configuration based on the scale set and returns it.

Authorizations:
path Parameters
resourceGroupName
required
string
Example: ExampleResourceGroup

Resource Group Name - Must be valid.

scaleSetName
required
string
Example: MyExampleScaleSetImport

Scale Set Name - Must be valid

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Group From Virtual Machine

Given a virtual machine, constructs a valid group configuration based on the virtual machine and returns it.

Authorizations:
path Parameters
resourceGroupName
string
Example: ExampleResourceGroup
virtualMachineName
string
Example: MyExampleVirtualMachineImport
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create VM Signal

The VM signal API is used for notifying Spot about the VM state so that Spot can act accordingly. Supported signals are vmReady – Whenever this signal is sent, Spot will register the instance to the relevant Load Balancer and Application Gateway. vmReadyToShutdown – When this signal is received after a vm is detached; we will immediately terminate the vm. You must define the expected signals for your Elastigroup in the group configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
signalType
required
String
Enum: "vmReady" "vmReadyToShutdown"

The specific signal you want to trigger.

vmName
required
string

The virtual machine ID the signal refers to.

Responses

Request samples

Content type
application/json
{
  • "vmName": "vm-123456",
  • "signalType": "vmReady"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Virtual Machine Protection

Protect virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

vmName
required
string
Example: i-f2a44ba41875

The virtual machine name to protect.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

ttlInMinutes
integer
Example: ttlInMinutes=180

Specify a TTL (in minutes) for this protection, meaning, for how long the protection will be valid for. (If null, infinite protection)

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Virtual Machine Remove Protection

Un-Protect virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

vmName
required
string
Example: i-f2a44ba41875

The virtual machine name to remove protection.

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get Elastilog

You can fetch a Elastigroup's Elastilog via the Spot API, in order to be able to consume elastilog from various tools used for log storing and analyzing. Logs have retention of 3 months back from today, so minimal fromDate should be up to 3 months back at runtime.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

limit
integer [ 0 .. 1000 ]
Example: limit=500

Maximum number of lines to extract in a response. Max value allowed - 1000. Default is 500, if got null.

RESOURCE_ID
string
Example: RESOURCE_ID=vm-12345678

Filter log extracted entires related to a specific resource id Default: Null

SEVERITY
string
Enum: "DEBUG" "WARN" "INFO" "ALL" "ERROR"
Example: SEVERITY=WARN

Severity of log entries to extract.

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup Azure Scale Set VMs

Elastigroup for Microsoft Azure Scale Set

List Elastigroups

List all Azure Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new Azure Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object (Azure Elastigroup)

Azure Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup Azure

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List all properties for single Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Update an Azure Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get the status for all instances that are memebers of the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instances

Detach one or more instances from an Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
drainingTimeout
integer
instancesToDetach
Array of strings
shouldDecrementTargetCapacity
boolean

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Deployments

Historical list of all deployments for an Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
string
Example: accountId=act-123abc

Your Spotinst accountid associated with your token

limit
integer
Example: limit=5

Limits results

sort
integer
Example: sort=created:ASC

Field to sort by the results

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Start a new Azure Elastigroup deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
batchSizePercentage
integer (Batch Size Percentage)

Indicates (in percentage) the batch size of the roll (meaning, how many nodes to replace in each batch)

gracePeriod
integer (Grace Period)

Indicates (in seconds) the timeout to wait until node become healthy in the ELB

healthCheckType
string (Health Check Type)

Define a health check type. valid values: mlb, node_state, none (wait the entire grace period for each batch). If no value is set the roll will use the group’s auto-healing health check.

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 50,
  • "gracePeriod": 300,
  • "healthCheckType": "INSTANCE_STATE"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Roll Status

Get status of a specific roll

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Elasticgroup id you want to roll

rollId
required
string
Example: sbgd-9876

The roll id you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

Your Spotinst accountid associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Task

Update an Elastigroup Azure

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Describe a single deployment for an Azure Elastigroup

Authorizations:
path Parameters
deploymentId
required
string
Example: sbgd-9876

Azure Elastigroup ID

groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop a deployment

Authorizations:
path Parameters
deploymentId
required
string
Example: sbgd-9876

Azure Elastigroup ID

groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Tasks

List all Azure Tasks for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Task

Create a new Azure Task

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Task

Delete an Elastigroup Azure

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Task

Update an Elastigroup Azure

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs Per Account

Get costs per time filter.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Managed Instance AWS

Managed Instances are Spots solution for launching and managing a single compute instance. On the AWS cloud, for a standard single instance workload, an On-Demand EC2 instance is launched. The instance is expected to be highly available, easily manageable, and integrate well with additional services and monitoring tools. For more information please review the concepts section.

Create Managed Instance

Create a new Managed Instance resource.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "managedInstance": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Managed Instances

List all Managed Instance resources in the account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Managed Instance

  • Update one or more attributes in your Managed Instance.
  • This API supports partial updates, so only specific fields can be updated separately.
  • In order to remove a setting from the instance config, set the object value to null.
  • For a Full List of the Elastigroup JSON object reference please see Managed Instance Create.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "managedInstance": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance

Get specific Managed Instance config.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Managed Instance

Get specific Managed Instance config.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Request Body schema: application/json
object
object

Responses

Request samples

Content type
application/json
{
  • "deallocationConfig": {
    },
  • "amiBackup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Pause Managed Instance

Pause an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Managed Instance

Resume an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Recycle Managed Instance

Recycle an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance Costs

Get financial information on a specific managed instance. To use this API, managedInstanceId must be defined.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

aggregationPeriod
string

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

fromDate
required
string <date-time>
Example: fromDate=2019-05-17

Get items on or after this date (ISO 8601)

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

toDate
required
string <date-time>
Example: toDate=2019-05-25

Get items on or before this date (ISO 8601)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance Status

Describes the current status of a specific Managed Instance – entailing information regarding running instance and its status.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Instance from AWS

  • Import an instance from AWS into Managed Instance, while keeping the instance data and its persistence settings.
  • This call is starting the migration and returns migration ID.
  • In order to get migration status use the Get Migration Status call
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object (Migration)

Migration Configuration

Responses

Request samples

Content type
application/json
{
  • "migration": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Instance Migration Status

  • Get a previously initiated instance migration status.
  • To initiate an instance migration from AWS use the Import Instance From AWS call.
  • On initiation, the migration would be in the following state: `MIGRATE_START`.
  • Possible end states for the migration are: `MIGRATE_CANCEL`, `MIGRATE_FINISH`, `MIGRATE_ERROR`.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Audit Log Events

Gets audit events that have response status of 200. This is the default when the responseStatus parameter is not included in the query. When you use responseStatus in the query, you can get all audit events without regard to status.

The API requires one of the following permissions to be defined in Spot:

  • Permission: Organization Viewer (See User Roles) or
  • Action: setup:describeAllAuditEvents (See Access Policies)
Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

required
string or string
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

responseStatus
any
Example: responseStatus=all

Determines whether the audit events should be filtered by their response status code or not. Valid values: "success": Gets only events with status 200. "all": Audit events will not be filtered by response status codes, and all the events will be returned. Default: success

required
string or string
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Health Check

Create an HCS for Spot Elastigroup.

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "healthCheck": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Health Checks

Get a list of all HCS services.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Health Check

Update existing HCS.

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "healthCheck": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Health Check

List the information of a particular HCS

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Health Check

Delete existing HCS

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Notifications Service

A Spot Notifications service enables you a fast, flexible, fully managed push notification service that lets you know about major events that happened in your Spot account.ֿ Spot Notifications makes it simple and cost-effective to get push notifications to your email address, HTTP, HTTPS or AWS SNS (Simple Notifications Service).

Update Account Notification Policy

Update the account notification policy

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "accountPolicy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Account Notification Policy

Get the account notification policy

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Subscribe

Create a notification for your resources

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "subscription": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Subscriptions

List all subscriptions and their information

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Unsubscribe

Delete an existing page

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Subscription

Get a specific notification and its information

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Subscription

Update existing notification

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Element that store all the subscription config

Responses

Request samples

Content type
application/json
{
  • "subscription": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Insights Service

Potential Savings

Describe Potential Savings for AWS resources like - ASG (Auto-scaling groups), Beanstalk, ELB, ECS, EMR and tagged instances. The response will provide Potential monthly savings in USD

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instances Potential Savings

Describe potential savings for the listed instances. You can provide multiple instance IDs separated by a comma. The response will provide potential monthly savings in USD.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

ID of the account associated with your token

instanceIds
required
string
Example: instanceIds=i-1234567

The instance ID

region
required
string
Example: region=us-east-1

The AWS Region

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs per Account

Retrieve costs per specified account over a specified time period. Example of URL with with daily aggregation period over a time period of 30 days - https://api.spotinst.io/aws/ec2/account/costs?fromDate=1585699200000&toDate=1588291199000&aggregationPeriod=daily

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

aggregationPeriod
string
Example: aggregationPeriod=daily

Optional. The time period over which data is aggregated. Can only be "daily". For example, the figures in each data set are per day

fromDate
string
Example: fromDate=2018-06-20

Date can be either in ISO-8601 date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

toDate
string
Example: toDate=2018-11-20

Date can be either in ISO-8601 date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suggested Instance Type

Get suggested instance types by required resources. Note that request must include region, and at least one of the following values - baselineInstanceType, requiredVCpu, requiredMemoryGib

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (AWS Elastigroup)

Responses

Request samples

Content type
application/json
{
  • "requirements": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Organization Instances Costs

Get a summary of your instances costs by given time filter.

The request will result in CSV format on your instances from all given accounts.

Notice that the date range can be up to 180 days.

Response fields are detailed in the response

Authorizations:
Request Body schema: application/json
accountIds
Array of strings
fromDate
string
toDate
string

Responses

Request samples

Content type
application/json
{
  • "accountIds": [
    ],
  • "fromDate": 1569950296,
  • "toDate": 1570727896
}

Response samples

Content type
application/csv
id,accountId,accountName,resourceId,cloudProvider,instanceId,instanceType,region,useCase,lifeCycle,product,launchTime,terminationTime,runningHours,odHourlyPrice,odCost,actualCost,savings,reservationId 2439,act-abc12345,Demo,oesg-cc4740e1,AWS,i-00d67d5efc69e938d,r4.large,us-west-2,K8S,EXCESS,LINUX,2019-10-05T02:59:40.000Z,2019-10-05T03:15:12.000Z,1,0.133,0.133,0.0337,0.0993, 2576,act-abc12345,Demo,oesg-5feb10ab,AWS,i-01086811aefdc4959,c4.large,us-west-2,K8S,EXCESS,LINUX,2019-10-06T10:13:03.000Z,2019-10-06T19:07:05.000Z,9,0.1,0.9,0.279,0.621, 1760,act-abc12345,Demo,oesg-cc4740e1,AWS,i-01797b0ac578198fa,c3.large,us-west-2,K8S,EXCESS,LINUX,2019-08-27T06:41:14.000Z,2019-10-05T02:57:30.000Z,23.9997,0.105,2.52,0.7008,1.8192, 1761,act-abc12345,Demo,oesg-cc4740e1,AWS,i-02e460584769b3c28,r4.large,us-west-2,K8S,EXCESS,LINUX,2019-08-20T22:23:54.000Z,,23.9997,0.133,3.192,0.8088,2.3832,